package com.boomshake.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 佣金记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("commission_record")
public class CommissionRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 获得佣金的分销员ID
     */
    @TableField("distributor_id")
    private Long distributorId;

    /**
     * 分享链接的分销员ID
     */
    @TableField("share_distributor_id")
    private Long shareDistributorId;

    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 下单客户ID
     */
    @TableField("customer_id")
    private Long customerId;

    /**
     * 订单金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;

    /**
     * 佣金比例
     */
    @TableField("commission_rate")
    private BigDecimal commissionRate;

    /**
     * 佣金金额
     */
    @TableField("commission_amount")
    private BigDecimal commissionAmount;

    /**
     * 分销员等级
     */
    @TableField("distributor_level")
    private Integer distributorLevel;

    /**
     * 门店ID
     */
    @TableField("store_id")
    private Long storeId;

    /**
     * 提现状态：0未提现 1已提现
     */
    @TableField("withdrawal_status")
    private Integer withdrawalStatus;

    /**
     * 提现申请ID
     */
    @TableField("withdrawal_id")
    private Long withdrawalId;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
} 